<template>
    <div>
        <Form :model="form" :label-width="100">
            <FormItem label="名称" class="mb-2">
                <i-input v-model="form.name" placeholder="请输入金融产品的名称"/>
            </FormItem>
            <FormItem label="描述"  class="mb-2">
                <i-input type="textarea" v-model="form.desc" placeholder="请输入金融产品的描述"/>
            </FormItem>
            <FormItem label="总授信金额"  class="mb-2">
                <InputNumber
                :max="10000000"
                v-model="form.totalMoney"
                :formatter="value => `$ ${value}`.replace(/B(?=(d{3})+(?!d))/g, ',')"
                :parser="value => value.replace(/$s?|(,*)/g, '')"></InputNumber>
            </FormItem>
            <FormItem label="风控对象类型"  class="mb-2">
                <Select v-model="form.mainBody">
                    <Option value="CUSTOMER">客户企业</Option>
                    <Option value="FACTORING">保理订单</Option>
                    <Option value="PERSON">个人</Option>
                </Select>
            </FormItem>
        </Form>
    </div>
</template>

<style scoped>

</style>

<script>
export default {
    name: 'ProductEdit',
    data(){
        return {
            form: {
                name: 'P2P小微贷款',
                desc: '点对点的小额融资贷款，风险高，收益高',
                totalMoney: 10000,
                mainBody: ''
            }
        }
    }
}
</script>
